From 8f0d79996d5945b769dd5cdca1fd331ea174ca88 Mon Sep 17 00:00:00 2001 From: "djm@kirby.fc.hp.com" Date: Tue, 10 May 2005 22:29:32 +0000 Subject: [PATCH] bitkeeper revision 1.1389.9.6 (428135ccBlRW99tjfmtjk5XjVtLT3A) Minor adaptations for common ACPI update and other common changes --- xen/arch/ia64/domain.c | 4 +-- xen/arch/ia64/irq.c | 2 ++ xen/arch/ia64/mm_init.c | 4 +-- xen/arch/ia64/patch/linux-2.6.11/unaligned.c | 32 +++++++++++++++++--- xen/arch/ia64/process.c | 4 +-- xen/arch/ia64/xenmisc.c | 8 +++++ xen/include/asm-ia64/config.h | 8 +++++ xen/include/asm-ia64/domain.h | 2 +- 8 files changed, 53 insertions(+), 11 deletions(-) diff --git a/xen/arch/ia64/domain.c b/xen/arch/ia64/domain.c index 056e9a711b..c20f025d7a 100644 --- a/xen/arch/ia64/domain.c +++ b/xen/arch/ia64/domain.c @@ -191,7 +191,7 @@ void arch_do_createdomain(struct exec_domain *ed) // stay on kernel stack because may get interrupts! // ia64_ret_from_clone (which b0 gets in new_thread) switches // to user stack - ed->thread.on_ustack = 0; + ed->arch._thread.on_ustack = 0; } void arch_do_boot_vcpu(struct exec_domain *p) @@ -261,7 +261,7 @@ void new_thread(struct exec_domain *ed, printf("new_thread: ed=%p, start_pc=%p, regs=%p, sw=%p, new_rbs=%p, IA64_STK_OFFSET=%p, &r8=%p\n", ed,start_pc,regs,sw,new_rbs,IA64_STK_OFFSET,®s->r8); sw->b0 = (unsigned long) &ia64_ret_from_clone; - ed->thread.ksp = (unsigned long) sw - 16; + ed->arch._thread.ksp = (unsigned long) sw - 16; //ed->thread_info->flags = 0; printk("new_thread, about to call init_all_rr\n"); init_all_rr(ed); diff --git a/xen/arch/ia64/irq.c b/xen/arch/ia64/irq.c index 1b4e277343..b04d49cc70 100644 --- a/xen/arch/ia64/irq.c +++ b/xen/arch/ia64/irq.c @@ -1406,9 +1406,11 @@ int pirq_guest_bind(struct exec_domain *d, int irq, int will_share) desc->handler->startup(irq); /* Attempt to bind the interrupt target to the correct CPU. */ +#if 0 /* FIXME CONFIG_SMP ??? */ if ( desc->handler->set_affinity != NULL ) desc->handler->set_affinity( irq, apicid_to_phys_cpu_present(d->processor)); +#endif } else if ( !will_share || !action->shareable ) { diff --git a/xen/arch/ia64/mm_init.c b/xen/arch/ia64/mm_init.c index d316e05357..0e3ce45dec 100644 --- a/xen/arch/ia64/mm_init.c +++ b/xen/arch/ia64/mm_init.c @@ -227,7 +227,7 @@ ia64_set_rbs_bot (void) if (stack_size > MAX_USER_STACK_SIZE) stack_size = MAX_USER_STACK_SIZE; - current->thread.rbs_bot = STACK_TOP - stack_size; + current->arch._thread.rbs_bot = STACK_TOP - stack_size; } /* @@ -255,7 +255,7 @@ printf("ia64_init_addr_space: called, not implemented\n"); if (vma) { memset(vma, 0, sizeof(*vma)); vma->vm_mm = current->mm; - vma->vm_start = current->thread.rbs_bot & PAGE_MASK; + vma->vm_start = current->arch._thread.rbs_bot & PAGE_MASK; vma->vm_end = vma->vm_start + PAGE_SIZE; vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7]; vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE|VM_GROWSUP; diff --git a/xen/arch/ia64/patch/linux-2.6.11/unaligned.c b/xen/arch/ia64/patch/linux-2.6.11/unaligned.c index bcc165e95e..0ed114e064 100644 --- a/xen/arch/ia64/patch/linux-2.6.11/unaligned.c +++ b/xen/arch/ia64/patch/linux-2.6.11/unaligned.c @@ -1,5 +1,5 @@ --- ../../linux-2.6.11/arch/ia64/kernel/unaligned.c 2005-03-02 00:38:25.000000000 -0700 -+++ arch/ia64/unaligned.c 2005-04-28 15:40:13.000000000 -0600 ++++ arch/ia64/unaligned.c 2005-05-10 15:46:09.000000000 -0600 @@ -437,7 +437,11 @@ } @@ -12,7 +12,31 @@ setreg (unsigned long regnum, unsigned long val, int nat, struct pt_regs *regs) { struct switch_stack *sw = (struct switch_stack *) regs - 1; -@@ -611,7 +615,11 @@ +@@ -522,7 +526,11 @@ + */ + if (regnum >= IA64_FIRST_ROTATING_FR) { + ia64_sync_fph(current); ++#ifdef XEN ++ current->arch._thread.fph[fph_index(regs, regnum)] = *fpval; ++#else + current->thread.fph[fph_index(regs, regnum)] = *fpval; ++#endif + } else { + /* + * pt_regs or switch_stack ? +@@ -581,7 +589,11 @@ + */ + if (regnum >= IA64_FIRST_ROTATING_FR) { + ia64_flush_fph(current); ++#ifdef XEN ++ *fpval = current->arch._thread.fph[fph_index(regs, regnum)]; ++#else + *fpval = current->thread.fph[fph_index(regs, regnum)]; ++#endif + } else { + /* + * f0 = 0.0, f1= 1.0. Those registers are constant and are thus +@@ -611,7 +623,11 @@ } @@ -24,7 +48,7 @@ getreg (unsigned long regnum, unsigned long *val, int *nat, struct pt_regs *regs) { struct switch_stack *sw = (struct switch_stack *) regs - 1; -@@ -1294,6 +1302,9 @@ +@@ -1294,6 +1310,9 @@ void ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs) { @@ -34,7 +58,7 @@ struct ia64_psr *ipsr = ia64_psr(regs); mm_segment_t old_fs = get_fs(); unsigned long bundle[2]; -@@ -1502,4 +1513,5 @@ +@@ -1502,4 +1521,5 @@ si.si_imm = 0; force_sig_info(SIGBUS, &si, current); goto done; diff --git a/xen/arch/ia64/process.c b/xen/arch/ia64/process.c index 1e0c10f53f..dd9e58071f 100644 --- a/xen/arch/ia64/process.c +++ b/xen/arch/ia64/process.c @@ -517,7 +517,7 @@ printf("ia64_fault, vector=0x%p, ifa=%p, iip=%p, ipsr=%p, isr=%p\n", case 32: /* fp fault */ case 33: /* fp trap */ //result = handle_fpu_swa((vector == 32) ? 1 : 0, regs, isr); - if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) { + //if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) { //siginfo.si_signo = SIGFPE; //siginfo.si_errno = 0; //siginfo.si_code = FPE_FLTINV; @@ -526,7 +526,7 @@ printf("ia64_fault, vector=0x%p, ifa=%p, iip=%p, ipsr=%p, isr=%p\n", //siginfo.si_isr = isr; //siginfo.si_imm = 0; //force_sig_info(SIGFPE, &siginfo, current); - } + //} //return; sprintf(buf, "FP fault/trap"); break; diff --git a/xen/arch/ia64/xenmisc.c b/xen/arch/ia64/xenmisc.c index 09dfc2a7b9..189c30b908 100644 --- a/xen/arch/ia64/xenmisc.c +++ b/xen/arch/ia64/xenmisc.c @@ -79,6 +79,14 @@ void raise_actimer_softirq(void) raise_softirq(AC_TIMER_SOFTIRQ); } +unsigned long __hypercall_create_continuation( + unsigned int op, unsigned int nr_args, ...) +{ + printf("__hypercall_create_continuation: not implemented!!!\n"); +} + +/////////////////////////////// + /////////////////////////////// // from arch/x86/apic.c /////////////////////////////// diff --git a/xen/include/asm-ia64/config.h b/xen/include/asm-ia64/config.h index 0a3672b18e..52e42933bb 100644 --- a/xen/include/asm-ia64/config.h +++ b/xen/include/asm-ia64/config.h @@ -258,6 +258,14 @@ struct screen_info { }; #define seq_printf(a,b...) printf(b) #define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0 +// +#define __smp_processor_id() (current->processor) + +// needed for newer ACPI code +#define asmlinkage + +#define FORCE_CRASH() asm("break 0;;"); + // these declarations got moved at some point, find a better place for them extern int opt_noht; extern int ht_per_core; diff --git a/xen/include/asm-ia64/domain.h b/xen/include/asm-ia64/domain.h index 619d450a00..7b6758078e 100644 --- a/xen/include/asm-ia64/domain.h +++ b/xen/include/asm-ia64/domain.h @@ -60,7 +60,7 @@ struct arch_exec_domain { }; #define active_mm arch.active_mm -#define thread arch._thread +//#define thread arch._thread // FOLLOWING FROM linux-2.6.7/include/sched.h -- 2.30.2